/*
 * Copyright © 2016 GENBAND. All Rights Reserved.
 *
 * GENBAND CONFIDENTIAL. All information, copyrights, trade secrets
 * and other intellectual property rights, contained herein are the property
 * of GENBAND. This document is strictly confidential and must not be
 * copied, accessed, disclosed or used in any manner, in whole or in part,
 * without GENBAND's express written authorization.
 *
 */

#ifndef KandyAnalyticsEnums_h
#define KandyAnalyticsEnums_h

#define REPORT_TYPE_PROVISION   @"REGISTRATION"
#define REPORT_TYPE_CALL        @"CALL"
#define REPORT_TYPE_PUSH        @"PUSH"
#define REPORT_TYPE_CHAT        @"CHAT"
#define REPORT_TYPE_BILLING     @"BILLING"
#define REPORT_TYPE_MPV         @"MPV"

static NSString * const KandyAnalyticsServiceErrorDomain = @"AnalticsServiceErrorDomain";

typedef NS_ENUM(NSInteger, EKandyReportSeverity)
{
    EKandyReportSeverity_none = 0,
    EKandyReportSeverity_assert,
    EKandyReportSeverity_info,
    EKandyReportSeverity_debug,
    EKandyReportSeverity_warning,
    EKandyReportSeverity_verbose,
    EKandyReportSeverity_last
};

typedef NS_ENUM(NSInteger, EKandyAnalyticsReportType){
    EKandyAnalyticsReportType_provision, // action on registration phase
    EKandyAnalyticsReportType_call, // call action (voice or video)
    EKandyAnalyticsReportType_push,
    EKandyAnalyticsReportType_chat,// chat/message action
    EKandyAnalyticsReportType_billing,
    EKandyAnalyticsReportType_mpv,
    EKandyAnalyticsReportType_last,
};

typedef NS_ENUM(NSInteger, EKandyAnalyticsClientAction){
    
    EKandyAnalyticsClientAction_unknown = -1,
    /**
     *  kandy socket initilize
     */
    EKandyAnalyticsClientAction_kandyInitilize,
    /**
     *  kandy socket connect request
     */
    EKandyAnalyticsClientAction_kandyConnect,
    /**
     *  kandy socket disconnect request
     */
    EKandyAnalyticsClientAction_kandyDisconnect,
    /**
     *  kandy socket connected status
     */
    EKandyAnalyticsClientAction_kandyConnected,
    /**
     *  kandy socket disconnected status
     */
    EKandyAnalyticsClientAction_kandyDisconnected,
    /**
     *  kandy socket
     */
    EKandyAnalyticsClientAction_kandyConnectionFail,
    /**
     *  spidr state is deregistered
     */
    EKandyAnalyticsClientAction_spidrDeregistered,
    /**
     *  spidr state is registered
     */
    EKandyAnalyticsClientAction_spidrRegistered,
    /**
     * register spidr started
     */
    EKandyAnalyticsClientAction_register,
    /**
     *  got succeed for register spidr
     */
    EKandyAnalyticsClientAction_registerSucceeded,
    /**
     *  got failed for register spidr
     */
    EKandyAnalyticsClientAction_registerFail,
    /**
     *  got connected to spidr socket
     */
    EKandyAnalyticsClientAction_spidrSocketConnected,
    
    /**
     *  got disconnected to spidr socket
     */
    EKandyAnalyticsClientAction_spidrSocketDisconnected,
    /**
     *  the client got voip push
     */
    EKandyAnalyticsClientAction_incomingPushCall,
    /**
     *  the client got answered call push
     */

    EKandyAnalyticsClientAction_answeredPushCall,
     
     /**
      *  the client got missed call push
      */

     EKandyAnalyticsClientAction_missedCallPush,
    /**
     *  incoming call from spidr
     */
    EKandyAnalyticsClientAction_callIncomming,
    /**
     *  forward call called
     */
    EKandyAnalyticsClientAction_callForward,
    /**
     *  accept call started
     */
    EKandyAnalyticsClientAction_callAccept,
    /**
     *  accept call finished succesfuly
     */
    EKandyAnalyticsClientAction_callAcceptSuccess,
    /**
     *  accept call failed
     */
    EKandyAnalyticsClientAction_callAcceptFail,
    /**
     *  create call called
     */
    EKandyAnalyticsClientAction_callCreate,
    /**
     *  create call success
     */
    EKandyAnalyticsClientAction_callCreateSuccess,
    /**
     *  create call fail
     */
    EKandyAnalyticsClientAction_callCreateFail,
    /**
     *  establish video call started
     */
    EKandyAnalyticsClientAction_callEstablishVideo,
    
    /**
     *  establish audio only call started
     */
    EKandyAnalyticsClientAction_callEstablishAudioOnly,
    /**
     *  establish call started - video disabled
     */
    EKandyAnalyticsClientAction_callEstablishAudio,
    /**
     *  establish call completed successfully
     */
    EKandyAnalyticsClientAction_callEstablishSuccess,
    /**
     *  establish call failed
     */
    EKandyAnalyticsClientAction_callEstablishFail,
    /**
     *  call was terminated
     */
    EKandyAnalyticsClientAction_callTerminated,
    /**
     *  call state was changed
     */
    EKandyAnalyticsClientAction_callStateChanged,
    
    /**
     *  The client send to the server wakeup message before call
     */
    EKandyAnalyticsClientAction_callSendWakeupMessage,
    
    /**
     *   The client received from the server wakeup message before call
     */
    EKandyAnalyticsClientAction_callReceiveWakeupMessage,
    
    /**
     *  call was ignored
     */
    EKandyAnalyticsClientAction_callIgnore,
    /**
     *  ignore call success
     */
    EKandyAnalyticsClientAction_callIgnoreSucceed,
    /**
     *  ignre call failed
     */
    EKandyAnalyticsClientAction_callIgnoreFailed,
    /**
     *  call was rejected
     */
    EKandyAnalyticsClientAction_callReject,
    /**
     *  reject call success
     */
    EKandyAnalyticsClientAction_callRejectSucceed,
    /**
     *  reject call failed
     */
    EKandyAnalyticsClientAction_callRejectFailed,
    /**
     *  call unhold
     */
    EKandyAnalyticsClientAction_callUnhold,
    /**
     *  unhold success
     */
    EKandyAnalyticsClientAction_callUnHoldSucceed,
    /**
     *  unhold failed
     */
    EKandyAnalyticsClientAction_callUnholdFailed,
    /**
     *  call hold
     */
    EKandyAnalyticsClientAction_callHold,
    /**
     *  hold success
     */
    EKandyAnalyticsClientAction_callHoldSucceed,
    /**
     *  hold failed
     */
    EKandyAnalyticsClientAction_callHoldFailed,
    /**
     *  hangup call
     */
    EKandyAnalyticsClientAction_callHangup,
    /**
     *  send DTMF
     */
    EKandyAnalyticsClientAction_callSendDTMF,
    /**
     *  tranfer call
     */
    EKandyAnalyticsClientAction_callTransfer,
    /**
     *  transfer success
     */
    EKandyAnalyticsClientAction_callTransferSucceed,
    /**
     *  transfer failed
     */
    EKandyAnalyticsClientAction_callTransferFailed,
    /**
     *  start send video
     */
    EKandyAnalyticsClientAction_startVideo,
    /**
     *  stop send video
     */
    EKandyAnalyticsClientAction_stopVideo,
    /**
     *  mute microphone
     */
    EKandyAnalyticsClientAction_muteMicrophone,
    /**
     *  mute microphone failed
     */
    EKandyAnalyticsClientAction_muteMicrophoneFailed,
    /**
     *  mute microphone succeed
     */
    EKandyAnalyticsClientAction_muteMicrophoneSucceed,
    /**
     *  unmute microphone
     */
    EKandyAnalyticsClientAction_unmuteMicrophone,
    /**
     *  unmute microphone failed
     */
    EKandyAnalyticsClientAction_unmuteMicrophoneFailed,
    /**
     *  unmute microphone succeed
     */
    EKandyAnalyticsClientAction_unmuteMicrophoneSucceed,
    /**
     *  media changed
     */
    EKandyAnalyticsClientAction_mediaStateChanged,
    /*
     * pass the SDP
     */
    EKandyAnalyticsClientAction_injectIncomingCallSDP,
    /*
     * detailed info
     */
    EKandyAnalyticsClientAction_detailedInfo,
    
    EKandyAnalyticsClientAction_last
  
};

#if defined __cplusplus
extern "C" {
#endif

// methods to convert enums to strings
NSString* EKandyAnalyticsReportTypeToString(EKandyAnalyticsReportType type);
NSString* EKandyAnalyticsClientActionToString(EKandyAnalyticsClientAction action);
NSString* KandyAnalyticsReportSeverityToString(EKandyReportSeverity severity);

#if defined __cplusplus
};
#endif

#endif /* KandyAnalyticsEnums_h */
